﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Zoo.Cat.Application.Polls;
using Zoo.Cat.Domain.Entities.Polls;
using Zoo.Infrastructure;

namespace Zoo.Cat.Web.Controllers {
    public class PollController : Controller {
        private readonly IPollService _pollService;
      
        public PollController(IPollService pollService) {
            this._pollService = pollService;
        }

        public ActionResult Index() {
            //return RedirectToAction("List");
            var polls = _pollService.GetPolls(0, 5);
            return View(polls);
        }

        public ActionResult List() {
            var polls = _pollService.GetPolls(0, 5);
            return View(polls);
        }

    }
}
